package com.muyu.user.service.impl;

import java.util.List;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.muyu.common.core.web.page.PageQueryModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.user.mapper.SysUserPointsMapper;
import com.muyu.user.domain.SysUserPoints;
import com.muyu.user.domain.model.SysUserPointsQueryModel;
import com.muyu.user.domain.model.SysUserPointsPageQueryModel;
import com.muyu.user.service.SysUserPointsService;

/**
 * 积分明细Service业务层处理
 *
 * @author liuguoqiang
 * @date 2025-09-18
 */
@Slf4j
@Service
public class SysUserPointsServiceImpl extends ServiceImpl<SysUserPointsMapper, SysUserPoints>  implements SysUserPointsService {

    /**
     * 查询积分明细列表
     *
     * @param pageQueryModel 积分明细
     * @return 积分明细
     */
    @Override
    public PageQueryModel<SysUserPointsPageQueryModel> pageQuery(SysUserPointsQueryModel pageQueryModel) {
        LambdaQueryWrapper<SysUserPoints> queryWrapper = new LambdaQueryWrapper<>();
            Page<SysUserPoints> page = this.page(pageQueryModel.buildPage(), queryWrapper);
        return PageQueryModel.of(page).cover(SysUserPointsPageQueryModel::infoBuild);
    }
}
